package com.vichat.agent.vo;

import java.util.HashMap;

/**
 * Created by wangluyin on 2018/1/13.
 */
public class JsonR {
    public final static int success = 0;
    public final static int error = -9;
    public final static int noauth = -1;
    private int code = 0;
    private String msg;
    private String i18nCode = "";

    public void setSuccess(boolean isSuccess) {
        if(isSuccess) {
            this.code = success;
        }
        else {
            this.code = error;
        }
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public HashMap getData() {
        return data;
    }

    public void setData(HashMap data) {
        this.data = data;
    }

    public String getI18nCode() {
        return i18nCode;
    }

    public void setI18nCode(String i18nCode) {
        this.i18nCode = i18nCode;
    }

    private HashMap data = new HashMap();

    public void putData(Object key,Object value) {
        data.put(key,value);
    }

}
